<template>
	<my-ref
		url="/log/mobile-code-log/list"
		v-model="table"
		@loaded="procData"
		:multi="$props.multi"
		:page-size="10"
		ref="list"
		name="mobileCodeLog"
		:store="true"
		v-bind="$attrs"
		@change="v=>$emit('change',v)"
		:readOnly="$props.readOnly"
	>


		<el-table-column align="center" label="module" prop="module_res"></el-table-column>
		<el-table-column align="center" label="mobile" prop="mobile"></el-table-column>
		<el-table-column align="center" label="templateCode" prop="templateCode"></el-table-column>
		<el-table-column align="center" label="param" prop="param"></el-table-column>
		<el-table-column align="center" label="bizId" prop="bizId"></el-table-column>
		<el-table-column align="center" label="result" prop="result"></el-table-column>
		<el-table-column align="center" label="errorMessage" prop="errorMessage"></el-table-column>
		<el-table-column align="center" label="sentAt" prop="sentAt"></el-table-column>
		<el-table-column align="center" label="arrivedAt" prop="arrivedAt"></el-table-column>
		<template #query="scope">
		</template>
		<template #button>
			<el-button>选择mobileCodeLog</el-button>
		</template>
	</my-ref>
</template>
<script setup>
/**
 * Created by CodeGenerator at 2022-02-22 15:33:17
 */



defineOptions({
    name: "mobile-code-log-ref",
    inheritAttrs: true,
});

//定义 vue2的this,当前组件
const $self = getCurrentInstance();

//定义 $attrs
const $attrs = useAttrs();



//定义data
const $data = reactive({
    MobileCodeModuleEnum: jv.enum.MobileCodeModuleEnum.getData()
});


const $props = defineProps({
    readOnly : { type: Boolean },
    multi : { type: Boolean }
});


const $model = defineModel({ type: [Object,Array] });



const list = ref();

//定义事件
const $emit = defineEmits(["update:modelValue","loaded"]);

const table = $computed({ get() {
        return $model;
    },set(v){
        var v = Object.assign(v.getJsType() == "array" ? [] : {}, v);
        $emit("update:modelValue", v);
    } });

const procData = function(res, op) {
    var json = res.data.data;
    json.forEach(it => {
//如果是组合实体，设置 it.id=...
        jv.enum.MobileCodeModuleEnum.fillRes(it, "module");
    });
};





</script>